﻿using System;

namespace CommonInteractive.Wizard
{
    public interface IItemWizard
    {
        Action ActionAfterShowForPrevious { set; }
        Action ActionBeforeGoToNext { set; }
        Action ActionBeforeGoToPrevious { set; }
        Action ActionBeforeShowForNext { set; }
        Action ActionForValidate { set; }
        object DataSource { get; set; }
        string Description { get; set; }
        void ExecuteActionBeforeGoToNext();
        void ExecuteActionBeforeGoToPrevious();
        void ExecuteActionValidate();
        void FinalizeWizard();
        bool Hide { get; set; }
        void Initialize();
        bool IsValid { get; }
        event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        event InErrorEventHandler InErrorEventChanged;
        

        void SetStory(IWizardStory story);

        bool InError { get; set; }

        bool Visible { get; set; }


        string Name { get; set; }

        void ExecuteActionBeforeShowForNext();

        void ExecuteActionAfterShowForPrevious();

        string Title { get; set; }

        Func<bool, bool> ActionIsValid { get; set; }

        string ErrorMessage { get; set; }
    }

    public delegate void InErrorEventHandler(object sender, WizardInErrorChangedEventArgs e);


}
